
ACTOR FlameCannon : BrutalWeapon
{
	Height 20
	Weapon.SelectionOrder 5550
	Weapon.AmmoUse 0
	Weapon.AmmoGive 40
	Weapon.AmmoType "Gas"
	Weapon.PreferredSkin "Flamethrower Marine"
    Inventory.PickupSound "BFGREADY"
     +WEAPON.NOAUTOAIM
	Inventory.PickupMessage "You got the Mancubus Flame Cannon (Slot 8)"
	Inventory.ForbiddenTo Sorcerer, Paladin, Corvus
	States
	{
	
	Steady:
		TNT1 A 1
		Goto Ready
	
	Ready:
	Ready3:
	ReadyLoop:
	Reload:
		FLMG A 1 A_WeaponReady
		FLMG A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
        FLMG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        FLMG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		FLMG A 0 A_JumpIfInventory("Salute1", 1, "Salute")
		FLMG A 0 A_JumpIfInventory("Salute2", 1, "Salute")
		FLMG A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		Goto Ready3
		
		
	DryFire:
	    FLMG A 10 A_PlaySound("weapons/empty")
		Goto Ready+6
	
	Deselect:
	    FLMG A 0 A_StopSound(CHAN_WEAPON)
		FLMG A 0 A_TakeInventory("TossGrenade", 1)
		FLMG A 1 A_Lower
		Loop
	Select:
		FLMG AAA 1 A_Raise
		Goto ReadyPlaceholder
ReadyPlaceholder:
	SHSS A 0 
	TNT1 A 0 A_PlaySound("BFGREADY")
	FLMS ABCDEF 1 A_WeaponReady(WRF_NOFIRE)
	Goto Ready
		
    Spawn:
        MANA H -1
        Stop
		
	 Fire:
        FLMG A 0
		FLMG A 0 A_JumpIf(waterlevel > 1, "DryFire")
        FLMG A 0 A_JumpIfInventory("Gas", 16, "Fireball")
		FLMG A 0 A_StopSound(CHAN_WEAPON)
		Goto DryFire
	
	AltFire:
	    FLMG A 0
		FLMG A 0 A_JumpIf(waterlevel > 1, "DryFire")
        FLMG A 0 A_JumpIfInventory("Gas", 28, "Flamethrower")
		FLMG A 0 A_StopSound(CHAN_WEAPON)
		Goto DryFire
		
	Fireball:	
        FLMF A 1 BRIGHT A_FireCustomMissile("BigFireBallWithGravity", 0, 1, 0, -6)
		FLMG A 0 A_SetPitch(-4.0 + pitch)
		FLMG A 0 A_TakeInventory("Gas", 16)
		TNT1 AAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("Shotgunparticles2", random(-12,12), 0, 0, -2, 0, random(-9,9))
		FLMG A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
        FLMF BC 1 BRIGHT 
        FLMF CD 1 A_SetPitch(+2.0 + pitch)
		FLMG A 5
		Goto Ready+2
	
 
		
	Flamethrower:
        FLMG A 0 BRIGHT A_FireCustomMissile("FlamethrowerMissile", 0, 1, 0, -12, 0, 8)
		TNT1 AAA 0 BRIGHT A_FireCustomMissile("Shotgunparticles2", random(-12,12), 0, 0, -2, 0, random(-9,9))
		FLMG A 0 A_PlaySound("FLAMER", CHAN_WEAPON, 1, 1)
		
		FLMG A 0 A_TakeInventory("Gas", 7)
		FLMF FG 1 BRIGHT A_SetAngle(random(1, -1) + angle)
		FLMG A 0 BRIGHT A_SetPitch(random(1, -1) + pitch)
		
		FLMG A 0 BRIGHT A_FireCustomMissile("FlamethrowerMissileNoLight", 0, 1, 0, -12, 0, 8)
		TNT1 AAA 0 BRIGHT A_FireCustomMissile("Shotgunparticles2", random(-12,12), 0, 0, -2, 0, random(-9,9))
		FLMG A 0 A_PlaySound("FLAMER", CHAN_WEAPON, 1, 1)
		FLMG A 0 A_TakeInventory("Gas", 7)
		FLMF FG 1 BRIGHT
		
		FLMG A 0 BRIGHT A_FireCustomMissile("FlamethrowerMissileNoLight", 0, 1, 0, -12, 0, 8)
		FLMG A 0 BRIGHT A_FireCustomMissile("Shotgunparticles2", random(-12,12), 0, 0, -2, 0, random(-9,9))
		FLMG A 0 A_PlaySound("FLAMER", CHAN_WEAPON, 1, 1)
		FLMG A 0 A_TakeInventory("Gas", 7)
		FLMF FG 1 BRIGHT
		
		FLMG A 0 BRIGHT A_FireCustomMissile("FlamethrowerMissileNoLight", 0, 1, 0, -12, 0, 8)
		FLMG A 0 BRIGHT A_FireCustomMissile("Shotgunparticles2", random(-12,12), 0, 0, -2, 0, random(-9,9))
		FLMG A 0 A_PlaySound("FLAMER", CHAN_WEAPON, 1, 1)
		FLMG A 0 A_TakeInventory("Gas", 7)
		FLMF FG 1 BRIGHT
		FLMG A 0 A_PlaySound("FLAMSTOP", CHAN_WEAPON)
		FLMG A 14
		Goto Ready+6
	}
}

ACTOR BigFireBallWithGravity: BigFireBall
{
Damage (random (100, 100))
Gravity 0.2
//+NOGRAVITY
Speed 50
Damagetype "Fire"
States
{
	Death:
	FLMG A 0
    FLMG A 0 A_Explode (60, 150)
	Goto ExplosionEffect
}
}






ACTOR Flames
{
	Radius 6
	Height 8
	Speed 30
	Damage 1
	Projectile 
	+RANDOMIZE
	+FORCEXYBILLBOARD
    +RIPPER
    +BLOODLESSIMPACT 
	RenderStyle Add
    DamageType Flames
    Scale 2.0
	Alpha 1
	SeeSound "fatso/attack"
	DeathSound "fatso/shotx"
    Decal "BigScorch"
	States
	{
    Spawn:
        TNT1 C 6
        Goto See
	See:
        FLMG A 0 A_Explode (15, 40)
        FRFX C 2 BRIGHT A_SpawnItem("RedFlareMedium",0,0)
        FLMG A 0 A_Explode (15, 40)
        FRFX C 2 BRIGHT A_SpawnItem("RedFlareMedium",0,0)
        FLMG A 0 A_Explode (15, 40)
	    EXPL AA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        FLMG A 0 A_Explode (15, 40)
        FRFX FGHIJKLMNOPG 2 BRIGHT A_SpawnItem("RedFlareMedium",0,0)
		Goto Death
	Death:
	    EXPL AA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
	    FLMG A 0 A_SpawnItem("RedFlareMedium",0,0)
		Stop
	}
}